07. Conditional Probability & Bayes Rule Quiz
Conditional Probability & Bayes Rule Quiz
In the previous section, you found the following proportions from the cancer results dataset.
- Patients with cancer: 0.105
- Patients without cancer: 0.895
- Patients with cancer who tested positive: 0.905
- Patients with cancer who tested negative: 0.095
- Patients without cancer who tested positive: 0.204
- Patients without cancer who tested negative: 0.796
Based on the above proportions observed in the data, we can assume the following probabilities.
Probability | Meaning |
---|---|
P(cancer) = 0.105 | Probability a patient has cancer |
P(~cancer) = 0.895 | Probability a patient does not have cancer |
P(positive|cancer) = 0.905 | Probability a patient with cancer tests positive |
P(negative|cancer) = 0.095 | Probability a patient with cancer tests negative |
P(positive|~cancer) = 0.204 | Probability a patient without cancer tests positive |
P(negative|~cancer) = 0.796 | Probability a patient without cancer tests negative |
Quiz Questions
Use the probabilities given above and Bayes rule to compute the following probabilities.
- Probability a patient who tested positive has cancer, or P(cancer|positive)
- Probability a patient who tested positive doesn't have cancer, or P(~cancer|positive)
- Probability a patient who tested negative has cancer, or P(cancer|negative)
- Probability a patient who tested negative doesn't have cancer, or P(~cancer|negative)
Then, use the Jupyter notebook to compare them to true proportions in the dataset.
QUIZ QUESTION: :
Using the probabilities above and Bayes rule, compute the following probabilities.
ANSWER CHOICES:
Probability |
Value |
---|---|
0.986 |
|
0.236 |
|
0.674 |
|
0.342 |
|
0.014 |
|
0.658 |
|
0.389 |
SOLUTION:
Probability |
Value |
---|---|
0.986 |
|
0.342 |
|
0.014 |
|
0.658 |
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a